# -*- coding: utf-8 -*-
# @Time    : 2019/3/25 17:26
# @Author  : Macher
# @File    : redis_test.py
# @Software: PyCharm Community Edition

import redis

r = redis.Redis(host='127.0.0.1', port=6379,db=0)
r.set('name', 'zhangsan')   #添加
print (r.get('name'))   #获取